package compute

import (
	"fmt"
	"time"
)

func PrintInput(ch chan string) {
	for val := range ch {
		//读取到结束符号
		if val == "EOF" {
			break
		}

		fmt.Printf("Input is %s\n", val)

	}
}

func Consum(ch chan int) {
	//线程休息100S再从channel读取数据
	// time.Sleep(time.Second * 100)
	time.Sleep(time.Second * 10)
	<-ch
}
